//
// Created by lymk on 2021/8/8.
//

#ifndef GAME2D_ANIMECOMPONENT_H
#define GAME2D_ANIMECOMPONENT_H
#include "Windows.h"
#include "../Utils.h"
#include "vector"
class GameActor;
enum AnimeState{
    IDLE,
    WALK,
    JUMP
};
class AnimeComponent {
    int MAX_FRAME_NUM;

    int nowFrame;
    PicData* animeData;
public:
    PicData *getAnimeData() const;

    void setAnimeData(PicData *animeData);

private:
    CoolUtil* animeCool;
    AnimeState animeState;

    int face;
public:
    AnimeComponent(){}
    void Initialize(std::string path,float interval,int frameNum);
    void update(double DeltaSeconds,RenderUtils renderUtils,GameActor* actor);
    void play_move(double DeltaSeconds,RenderUtils renderUtils,GameActor* actor);
    void Finalize();

public:
    AnimeState getAnimeState() const;

    void setAnimeState(AnimeState animeState);
};


#endif //GAME2D_ANIMECOMPONENT_H
